/*
 * Team.h
 *
 *  Created on: Nov 18, 2008
 *      Author: Ryan
 */

#ifndef TEAM_H_
#define TEAM_H_

#include "Object.h"
#include "Player.h"

#include <set>


namespace OOInterface
{

typedef std::set< ConstPlayerPtr > ConstPlayerSet;

class Team: public OOInterface::Object
{
public:
	Team();
	virtual ~Team();

	bool has( ConstPlayerPtr p ) const;
	inline const ConstPlayerSet members() const { return _members; }
	inline int teamSize() const { return _members.size(); }

	inline void addPlayer( ConstPlayerPtr p ) { _members.insert( p ); }
	inline void removePlayer( ConstPlayerPtr p ) { _members.insert( p ); }

	virtual std::string toString() const { return std::string("Team"); }

private:
	ConstPlayerSet _members;
};

}

#endif /* TEAM_H_ */
